package com.gdou.crrp.repository;

import com.gdou.crrp.entity.Topic;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface TopicRepository extends JpaRepository<Topic, Integer>,JpaSpecificationExecutor<Topic> {

    Page<Topic> findAll(Pageable pageable);

    @Transactional
    void deleteById(Integer id);
}
